//
// Created by liushuai on 2021/3/14.
//

#include "dijkstra.h"
// 未进行单元测试
<<<<<<< HEAD
vector<string> dijkstra(GraphNode* start,GraphNode* end){

    vector<string> res;
    if(!start||!end)
        return res;
    GraphNode* current = start;
    while(current!=end&&!current->getVisit()){
        res.push_back(current->getName());
        current->setVisited();
        current = current->getMinNode();
    }
    if(current)
        res.push_back(current->getName());
    return res;

=======
vector<string> dijkstra(GraphNode* start, GraphNode* end) {
  vector<string> res;
  if (!start || !end) return res;
  GraphNode* current = start;
  while (current != end && !current->getVisit()) {
    res.push_back(current->getName());
    current->setVisited();
    current = current->getMinNode();
  }
  if (current) res.push_back(current->getName());
  return res;
>>>>>>> dev
}